package exam.web.action;

import java.util.List;

import exam.business.service.QuestionGetListService;
import exam.common.key.KeyQuestion;
import exam.model.entity.TQuestionEntity;
import exam.web.action.base.QuestionActionBase;

/**
 * <p>IndexQuestionAction</p>
 * 
 * @author Phong
 * @version (update 21/5/2012)
 */

public class IndexQuestionAction extends QuestionActionBase {

	private static final long serialVersionUID = 1L;
	
	/**
	 * listQuestionEntity
	 */
	public List<TQuestionEntity> tQuestionEntityList;
	
	@Override
	public String execute() throws Exception {
		// yeu cau lay danh sach cau hoi
		QuestionGetListService quesGetListService = new QuestionGetListService();
		quesGetListService.executeService(serviceInfo);
		// lay danh sach cau hoi tu serviceInfo
		tQuestionEntityList = serviceInfo.getList(KeyQuestion.T_QUESTION_ENTITY_LIST);
		addActionMessage("Danh sách câu hỏi");
		return SUCCESS;
	}

	public List<TQuestionEntity> gettQuestionEntityList() {
		return tQuestionEntityList;
	}

	public void settQuestionEntityList(List<TQuestionEntity> tQuestionEntityList) {
		this.tQuestionEntityList = tQuestionEntityList;
	}

}
